using Gateway.Common.Extensions;

namespace Gateway.IQuery.Sign.Result;

/// <summary>
/// 登录结果
/// </summary>
public class LoginResult
{
    /// <summary>
    /// 登录面板
    /// </summary>
    public string Dashboard { get; set; } = "1";

    /// <summary>
    /// 登录后的token
    /// </summary>
    public string Token { get; set; }

    /// <summary>
    /// 登录人信息
    /// </summary>
    public LoginUserInfoResult UserInfo { get; set; }
}

/// <summary>
/// 登录人信息
/// </summary>
public class LoginUserInfoResult
{
    /// <summary>
    /// 登录账号
    /// </summary>
    public string Account { get; set; }
    /// <summary>
    /// 用户名
    /// </summary>
    public string UserName { get; set; }

    /// <summary>
    /// 用户标识
    /// </summary>
    public string UserId { get; set; }

    /// <summary>
    /// 角色id字符串
    /// </summary>
    public string RoleIds { get; set; }

    /// <summary>
    /// 角色集合
    /// </summary>
    public List<string> Role => RoleIds.ToSplitList(",");
}